package cn.edu.scau.cmi.linkaibo.client;

import cn.edu.scau.cmi.linkaibo.simpleFactoryMethod.domain.*; 
import cn.edu.scau.cmi.linkaibo.factory.*; 
import java.util.Scanner; 

public class FactoryClient { 
 public static void main(String[] args) { 
	 
  System.out.println("Please select meat: beef ,chicken or pork"); 
  Scanner scanner = new Scanner(System.in); 
  String meatKind = scanner.next(); 
  meatKind=meatKind.toLowerCase(); 
  MeatFactory meatFactory=null; 

  switch(meatKind) { 

  case "beef": meatFactory=new BeefFactory();break; 

  case "pork": meatFactory=new PorkFactory();break; 

  case "chicken": meatFactory=new ChickenFactory();break; 
  default:System.out.println("sorry, it is not correct"); 

  } 
  if(meatFactory!=null) { 
   Meat meat=meatFactory.getMeat(); 
  } 
 } 
}